package com.yuexi.infrastructure.converter;

import com.yuexi.domain.bill.bo.AddBillBO;
import com.yuexi.domain.bill.bo.AddBillDetailBO;
import com.yuexi.domain.bill.bo.BillBO;
import com.yuexi.domain.syscode.bo.SysCodeResultBO;
import com.yuexi.domain.table.bo.TableBO;
import com.yuexi.infrastructure.db.entity.Bill;
import com.yuexi.infrastructure.db.entity.BillDetail;
import com.yuexi.infrastructure.db.entity.TSysCode;
import com.yuexi.infrastructure.db.entity.Table;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author jie
 * @date 2022/9/23 -12:04
 */
@Mapper
public interface Converter {
    Converter INSTANCE = Mappers.getMapper(Converter.class);

    List<TableBO> toTableBOList(List<Table> list);

    List<SysCodeResultBO> toSysCodeResultBOList(List<TSysCode> sysCodeList);

    Bill toBill(AddBillBO bo);

    BillDetail toBillDetail(AddBillDetailBO bo);

    BillBO toBillBO(AddBillBO bo);

    List<BillBO> toBillBOList(List<Bill> list);

}
